package com.parking.mgr.useraccount.controller;

import com.parking.mgr.common.pojo.response.Result;
import com.parking.mgr.useraccount.service.BasicCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @ClassName BasicCodeController
 * @Description 数据字典
 * @Auther: shilintao
 * @Date: 2023/5/24
 */
@Api(value = "数据字典",tags = {"数据字典"})
@RequestMapping("/api/basic/code")
@RestController
public class BasicCodeController {

    final static Logger logger = LoggerFactory.getLogger(BasicCodeController.class);

    @Resource
    private BasicCodeService basicCodeService;


    /**
     * 根据fKey获取字典
     * @param fKey
     * @return
     */
    @GetMapping("/codefkey")
    @ApiOperation(value = "根据fKey获取字典",notes = "根据fKey获取字典",httpMethod = "GET")
    public Result<?> getCodeByFKey(String fKey){
        return Result.success(basicCodeService.getCodeByFKey(fKey));
    }

}
